<template>
  <div>
    <div>
      <button @click="comps = 'Register'">账号密码填写</button>
      <button @click="comps = 'UserInfo'">个人信息填写</button>
    </div>
    <p>下面显示注册组件:</p>
    <div style="border: 1px solid red">
      <component :is="comps"></component>
    </div>
  </div>
</template>

<script>
import Register from "../components/Register";
import UserInfo from "../components/UserInfo";
export default {
  data() {
    return {
      comps: "Register",
    };
  },
  components: {
    Register,
    UserInfo,
  },
};
</script>

<style>
</style>